package com.it.app;
//定义一个方法给定任意一个正数。分解质因数并打印质因数
import java.util.Scanner;
public class NumJudge {
   public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
       System.out.println("请输入一个正整数");
       int num = sc.nextInt();
       numJudge(num);
    }
    public static void numJudge(int num){
       for(int i = 2;i<=num;i++){
           if(num%i==0){
               System.out.print(i+" ");
               num = num/i;
               i--;
               System.out.println(" "+ num);
               if(num==1) {
                   break;
               }
           }
       }
    }
}
